/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

#include <IOmenRigidBody.h>

namespace Omen
{
    class RigidBody : public Omen::IRigidBody
    { 
        #define GUID_OMEN_RIGIDBODY "700C24C8-4866-4B95-805F-CA678B724EE1"

    public:
        OMEN_API virtual Omen_GUID classId() const { return OMEN_UUID(GUID_OMEN_RIGIDBODY); }    /// <summary>Defines the class ID</summary>

    public:
        RigidBody();
        RigidBody( const RigidBody& other );
        virtual ~RigidBody();
       
        virtual Omen::Float mass() const;                           /// <summary>Returns the mass of the physical object</summary>
        virtual void setMass( const Omen::Float& mass );            /// <summary>Sets the mass of the physical object</summary>

        virtual Omen::Float drag() const;                           /// <summary>Returns the value of how much air resistance slows down the moving of the physical object. 0 means no air resistance, infinity means that movement stops immeadiately.</summary>
        virtual void setDrag( const Omen::Float& drag );                /// <summary>Sets the value of how much air resistance slows down the moving of the object</summary>

        virtual Omen::Float angularDrag() const;                    /// <summary>Returns the value of how much air resistance slows down the rotation of the physical object. 0 means no air resistance, infinity means that rotation stops immeadiately.</summary>
        virtual void setAngularDrag( const Omen::Float& aDrag );    /// <summary>Sets the value of how much air resistance slows down the rotation of the object</summary>

        virtual bool useGravity() const;                            /// <summary>Returns true if this object uses gravity</summary>
        virtual void setUseGravity( bool bUseGravity );             /// <summary>Sets bool value of whether this object is affected by gravity</summary>
        
        virtual Omen::Vector3d moveConstraints() const;             /// <summary>Returns a 3d-vector which defines the movement constraints of this physical object. Vector3d(1,1,1) stops the moving the object in x,y,z directions, Vector3d(0,0,0) Allows movement in all x,y,z directions</summary>
        virtual void setMoveConstraints( const Omen::Vector3d& constraints ); /// <summary>Sets a 3d vector defining the movement constraints</summary>

        virtual Omen::Vector3d rotationConstraints() const;         /// <summary>Returns a 3d-vector, with possible values: Vector3d(1,1,1) stops the rotating the object in x,y,z directions, Vector3d(0,0,0) Allows rotation in all x,y,z directions</summary>
        virtual void setRotationConstraints( const Omen::Vector3d& constraints ); /// <summary>Sets a 3d vector defining the rotation constraints</summary>

    protected:
    private:
        Omen::Float     m_mass;
        
        Omen::Float     m_velocity;
        Omen::Float     m_angularVelocity;
        
        Omen::Float     m_drag;
        Omen::Float     m_angularDrag;
        
        bool            m_bUseGravity;
        bool            m_bIsKinematic;

        Omen::Vector3d  m_moveConstraints;
        Omen::Vector3d  m_rotationConstraints;

        Omen::Vector3d  m_centerOfMass;



    };
}
/// EOF